<html>
<head><meta charset="utf-8"><title>ui tests for MIR test · t-compiler · Zulip Chat Archive</title></head>
<h2>Stream: <a href="https://rust-lang.github.io/zulip_archive/stream/131828-t-compiler/index.html">t-compiler</a></h2>
<h3>Topic: <a href="https://rust-lang.github.io/zulip_archive/stream/131828-t-compiler/topic/ui.20tests.20for.20MIR.20test.html">ui tests for MIR test</a></h3>

<hr>

<base href="https://rust-lang.zulipchat.com">

<head><link href="https://rust-lang.github.io/zulip_archive/style.css" rel="stylesheet"></head>

<a name="150831089"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/131828-t-compiler/topic/ui%20tests%20for%20MIR%20test/near/150831089" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> eddyb <a href="https://rust-lang.github.io/zulip_archive/stream/131828-t-compiler/topic/ui.20tests.20for.20MIR.20test.html#150831089">(Dec 04 2018 at 08:25)</a>:</h4>
<p><span class="user-mention" data-user-id="116009">@nikomatsakis</span> I wonder if we can replace MIR tests with regular UI ones. the MIR test implementation is incredibly frustrating</p>



<a name="150831826"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/131828-t-compiler/topic/ui%20tests%20for%20MIR%20test/near/150831826" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> oli <a href="https://rust-lang.github.io/zulip_archive/stream/131828-t-compiler/topic/ui.20tests.20for.20MIR.20test.html#150831826">(Dec 04 2018 at 08:43)</a>:</h4>
<p>so they'd emit <code>.mir</code> files instead of <code>.stderr</code> files but generally behave the same?</p>



<a name="150831987"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/131828-t-compiler/topic/ui%20tests%20for%20MIR%20test/near/150831987" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> eddyb <a href="https://rust-lang.github.io/zulip_archive/stream/131828-t-compiler/topic/ui.20tests.20for.20MIR.20test.html#150831987">(Dec 04 2018 at 08:47)</a>:</h4>
<p>hmm I was thinking just making it <code>stdout</code> but maybe you're right</p>



<a name="150832051"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/131828-t-compiler/topic/ui%20tests%20for%20MIR%20test/near/150832051" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> oli <a href="https://rust-lang.github.io/zulip_archive/stream/131828-t-compiler/topic/ui.20tests.20for.20MIR.20test.html#150832051">(Dec 04 2018 at 08:49)</a>:</h4>
<p>We could even make it emit multiple <code>.mir</code> files (one per passes). Maybe comments in the <code>.rs</code> file could decide which passes to dump</p>



<a name="150832151"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/131828-t-compiler/topic/ui%20tests%20for%20MIR%20test/near/150832151" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> eddyb <a href="https://rust-lang.github.io/zulip_archive/stream/131828-t-compiler/topic/ui.20tests.20for.20MIR.20test.html#150832151">(Dec 04 2018 at 08:51)</a>:</h4>
<p>hmm oh right we'd need things like <code>foo.pass-name.mir</code></p>



<a name="150832829"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/131828-t-compiler/topic/ui%20tests%20for%20MIR%20test/near/150832829" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> oli <a href="https://rust-lang.github.io/zulip_archive/stream/131828-t-compiler/topic/ui.20tests.20for.20MIR.20test.html#150832829">(Dec 04 2018 at 09:07)</a>:</h4>
<p>once I'm done with <a href="https://github.com/rust-lang/rust/pull/56244" target="_blank" title="https://github.com/rust-lang/rust/pull/56244">https://github.com/rust-lang/rust/pull/56244</a> I'll have a look at that</p>



<a name="150842633"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/131828-t-compiler/topic/ui%20tests%20for%20MIR%20test/near/150842633" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> nikomatsakis <a href="https://rust-lang.github.io/zulip_archive/stream/131828-t-compiler/topic/ui.20tests.20for.20MIR.20test.html#150842633">(Dec 04 2018 at 12:20)</a>:</h4>
<p>I think that sounds great, <em>but</em></p>



<a name="150842641"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/131828-t-compiler/topic/ui%20tests%20for%20MIR%20test/near/150842641" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> nikomatsakis <a href="https://rust-lang.github.io/zulip_archive/stream/131828-t-compiler/topic/ui.20tests.20for.20MIR.20test.html#150842641">(Dec 04 2018 at 12:20)</a>:</h4>
<p>we do want <em>some</em> way to specify precisely <em>what</em> we are looking for</p>



<a name="150842642"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/131828-t-compiler/topic/ui%20tests%20for%20MIR%20test/near/150842642" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> nikomatsakis <a href="https://rust-lang.github.io/zulip_archive/stream/131828-t-compiler/topic/ui.20tests.20for.20MIR.20test.html#150842642">(Dec 04 2018 at 12:20)</a>:</h4>
<p>I think?</p>



<a name="150842649"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/131828-t-compiler/topic/ui%20tests%20for%20MIR%20test/near/150842649" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> nikomatsakis <a href="https://rust-lang.github.io/zulip_archive/stream/131828-t-compiler/topic/ui.20tests.20for.20MIR.20test.html#150842649">(Dec 04 2018 at 12:20)</a>:</h4>
<p>I agree that the tests are annoying as is</p>



<a name="150842653"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/131828-t-compiler/topic/ui%20tests%20for%20MIR%20test/near/150842653" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> nikomatsakis <a href="https://rust-lang.github.io/zulip_archive/stream/131828-t-compiler/topic/ui.20tests.20for.20MIR.20test.html#150842653">(Dec 04 2018 at 12:20)</a>:</h4>
<p>I'm just thinking of the <code>//~ ERROR</code> vs <code>stderr</code> dichotomy</p>



<a name="150842665"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/131828-t-compiler/topic/ui%20tests%20for%20MIR%20test/near/150842665" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> nikomatsakis <a href="https://rust-lang.github.io/zulip_archive/stream/131828-t-compiler/topic/ui.20tests.20for.20MIR.20test.html#150842665">(Dec 04 2018 at 12:21)</a>:</h4>
<p>where the <code>ERROR</code> serves to ensure that the contents of stderr are at least <em>roughly</em> correct, and also lets you encode a bit of the message if you like</p>



<a name="150842667"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/131828-t-compiler/topic/ui%20tests%20for%20MIR%20test/near/150842667" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> nikomatsakis <a href="https://rust-lang.github.io/zulip_archive/stream/131828-t-compiler/topic/ui.20tests.20for.20MIR.20test.html#150842667">(Dec 04 2018 at 12:21)</a>:</h4>
<p>not sure if there is some way to get some of that for the mir tests?</p>



<a name="150842674"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/131828-t-compiler/topic/ui%20tests%20for%20MIR%20test/near/150842674" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> nikomatsakis <a href="https://rust-lang.github.io/zulip_archive/stream/131828-t-compiler/topic/ui.20tests.20for.20MIR.20test.html#150842674">(Dec 04 2018 at 12:21)</a>:</h4>
<p>I'd settle for using comments if we must though, I agree the workflow is very painful :)</p>



<a name="150842676"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/131828-t-compiler/topic/ui%20tests%20for%20MIR%20test/near/150842676" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> davidtwco <a href="https://rust-lang.github.io/zulip_archive/stream/131828-t-compiler/topic/ui.20tests.20for.20MIR.20test.html#150842676">(Dec 04 2018 at 12:21)</a>:</h4>
<p><code>// error-pattern: ...</code> already exists and could work?</p>



<a name="150842720"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/131828-t-compiler/topic/ui%20tests%20for%20MIR%20test/near/150842720" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> nikomatsakis <a href="https://rust-lang.github.io/zulip_archive/stream/131828-t-compiler/topic/ui.20tests.20for.20MIR.20test.html#150842720">(Dec 04 2018 at 12:22)</a>:</h4>
<p>well, that wouldn't literally work for mir tests</p>



<a name="150842726"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/131828-t-compiler/topic/ui%20tests%20for%20MIR%20test/near/150842726" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> davidtwco <a href="https://rust-lang.github.io/zulip_archive/stream/131828-t-compiler/topic/ui.20tests.20for.20MIR.20test.html#150842726">(Dec 04 2018 at 12:22)</a>:</h4>
<p>Yeah, but something in that vein.</p>



<a name="150842727"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/131828-t-compiler/topic/ui%20tests%20for%20MIR%20test/near/150842727" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> nikomatsakis <a href="https://rust-lang.github.io/zulip_archive/stream/131828-t-compiler/topic/ui.20tests.20for.20MIR.20test.html#150842727">(Dec 04 2018 at 12:22)</a>:</h4>
<p>but I guess we could have some kind of pattern to search for</p>



<a name="150842729"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/131828-t-compiler/topic/ui%20tests%20for%20MIR%20test/near/150842729" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> nikomatsakis <a href="https://rust-lang.github.io/zulip_archive/stream/131828-t-compiler/topic/ui.20tests.20for.20MIR.20test.html#150842729">(Dec 04 2018 at 12:22)</a>:</h4>
<p>I can't think what else to do, not sure how successfully that can encode the interesting cases</p>



<a name="150842730"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/131828-t-compiler/topic/ui%20tests%20for%20MIR%20test/near/150842730" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> nikomatsakis <a href="https://rust-lang.github.io/zulip_archive/stream/131828-t-compiler/topic/ui.20tests.20for.20MIR.20test.html#150842730">(Dec 04 2018 at 12:22)</a>:</h4>
<p>some of those mir tests may want to just be removed</p>



<hr><p>Last updated: Aug 07 2021 at 22:04 UTC</p>
</html>